The present invention relates to inter-process communications. An understanding of certain inter-process operations, described below, is necessary in order to understand the invention. UNIX.RTM. is taken as an example.
Recent years have seen a significant rise in the commercial popularity of the UNIX.RTM. operating system. Although UNIX.RTM. was originally preferred only by computer scientists, computer science students and other extremely technically proficient computer users, the preference for UNIX.RTM. as a commercial programming environment is growing as those students matriculate into the work force and carry their developed preferences with them. Accordingly, it behooves a computer manufacturer to provide a UNIX.RTM. or UNIX.RTM.-like programming environment along with its proprietary hardware.
Two interfaces which a UNIX.RTM. environment typically provides are pipes and fifos. Pipes and fifos are memory-resident first-in, first-out queues of data which cooperating processes may use for communicating with each other without knowing the identity of each other. (In UNIX.RTM., a "process" is the dynamic, run-time embodiment of a program. The program typically resides in a static state on a storage medium such as disk or tape, while the process is loaded into memory and is executing. UNIX.RTM. is a multitasking operating system: Many processes can be executing essentially simultaneously.) Both pipes and fifos are file system objects accessed via normal file system calls. Pipes and fifos differ from a regular file system file in that its data is transient: Once data is read from a pipe or fifo, that data cannot be read again.
An important difference between pipes and fifos is that fifos have normal file system file names while pipes do not. As a result, many operations which require a file system file name work for fifos but do not work for pipes.
In UNIX.RTM., a process can create another process by performing the fork() system call. The result of a fork() system call is the creation of a new process which is a copy of the old process, except inter alia it has its own unique process identification number. This procedure of a process creating a copy of itself is called "forking." In forking, the older process is called the "parent" and the newer process is called the "child." Of course, a parent can have many children, while a child has only one parent.
A pipe is created and opened using the pipe() system call. Opened pipes in a process are propagated to child processes upon forking. After one or many forks, all of the descendants of the process which called pipe(), as well as the process itself, can communicate using the pipe.
A fifo is created using the mkfifo() (pronounced, `make fifo`) system call. A call to this system entry point creates an entry for the fifo in the file system. After creation of the fifo, any process with sufficient permission may open (i.e., open()) the file. Consequently, processes which do not share a common ancestor can communicate using the fifo.
UNIX.RTM., however, has historically been an operating system for uniprocessors: originally the Digital Equipment Corporation's PDP-11, later mainframes, and still later microprocessors with the boom in microcomputers. Even today, only a handful of multiprocessor implementations of UNIX.RTM. exist.
In implementations of the prior art, pipes and fifos could be established only between two processes running on the same cpu. For example, the Network File System (NFS) from Sun Microsystems of Mountain View, Calif. permits a process to communicate with other processes only on the same machine.
An implementation of distributed pipes and fifos stands a high chance of performing below a user's expectations.
Still further, an implementation of distributed pipes and fifos significantly complicates error recovery.
Accordingly, one object of this invention is a UNIX-like operating system on a multiprocessor which transparently supports the pipes and fifos found on traditional UNIX.RTM.-like implementations.
These and other objects of the invention will be readily apparent to those of skill in the art on reading the disclosure below.